package org.springblogs.batch.config.stock;

import org.springblogs.batch.processor.stock.StockInfoItemProcessor;
import org.springblogs.dao.StockMarketRepository;
import org.springblogs.model.StockInfo;
import org.springblogs.model.StockMarket;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Component;

@Component
public class StockInfoBatchJob extends AbstractRepositoryBatchJob<StockMarket, StockInfo> {
	@Autowired
	private StockInfoItemProcessor processor;
	@Autowired
	private StockMarketRepository reader;

	@Override
	protected ItemProcessor<StockMarket, StockInfo> processor() {
		return processor;
	}

	@Override
	public PagingAndSortingRepository<StockMarket, ?> getReadRepository() {
		return reader;
	}
	
}